home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16246 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: jth.ping.de!jth
  2. Date: 09 Apr 1996 21:37:00 +0100
  3. From: jth@jth.ping.de (Jens Theisen)
  4. Newsgroups: comp.lang.c++
  5. Message-ID: <66W26MfzoNB@jth.ping.de>
  6. References: <4k9v0e$p57@nova.umuc.edu>
  7. Subject: Re: " A silly beginner's question
  8. X-Newsreader: CrossPoint v3.1
  9.  
  10. Steve Russell  wrote:
  11. > Anyway what is a " core dump"?  What causes it?  What is a
  12. > "segment fault"?  I've seen messages like " segment fault, core
  13. > dumped".  I stopped it by putting in exit commands before they
  14. > could happen, but what do these messages mean?
  15.  
  16. I don't know. Perhaps you should refer your manual. (If you have one :-) )
  17.  
  18. > Also, I made my first class destructor today for deallocating
  19. > dynamically allocated memory.  I put a brief output message in
  20. > it to let me know when it executes.  I never saw it, does this
  21. > mean that it doesn't execute or just that it executes after my
  22. > program is completely over ( hence no message).
  23.  
  24. No, destructors are always executed before the exit itself is. That means  
  25. that your destructor is not. Perhaps, if you have used the new-operator,  
  26. you forgot to use the delete-operator. Perhaps, you simple don't have  
  27. declared your destructor correctly.
  28.  
  29. > Is there a way to manually get the destructor to execute?
  30.  
  31. Yes:
  32.  X *p;
  33.  p->X::~X()
  34.  
  35.  - Jens Theisen / jth@jth.ping.de -
  36.